package com.test.springmvc;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2018/10/16 11:11
 */
@Controller
public class HelloWorld {

    @Autowired
    private UserService userService;

    public HelloWorld() {
        System.out.println("helloworld constructor");
    }

    @RequestMapping("/helloWorld")
    public String hello() {
        System.out.println("hello world");
        System.out.println(userService);
        return "success";
    }
}
